package zyc.java.project;

abstract class Father {
    Father() {
        print();
    }
    abstract void print();
}

class Son extends Father {
    Son() {
        System.out.println("Son construct function.");
    }
    void print() {
        System.out.println("Son: abstract method implemented.");
    }
}

class GrandSon extends Son {
    GrandSon() {
        System.out.println("GrandSon construct function.");
    }
    void print() {
        System.out.println("GrandSon: abstract method implemented.");
    }
}


public class Main {
    public static void main(String[] args) {
        GrandSon son = new GrandSon();
    }
}